//
//  PlaveTableViewCell.m
//  GOGOTravel
//
//  Created by dllo on 16/1/27.
//  Copyright © 2016年 果果. All rights reserved.
//

#import "PlaveTableViewCell.h"

@implementation PlaveTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
    
    if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"yeJianMoShi"] isEqualToString:@"isDay"]) {
        self.backgroundColor = DAYCOLOR;
    }else{
        self.backgroundColor = NIGHTCOLOR;
    }
    
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeColor:) name:@"yeJianMoShi" object:nil];
}

- (void)changeColor:(NSNotification *)notification{
    
    if ([[[NSUserDefaults standardUserDefaults]objectForKey:@"yeJianMoShi"]isEqualToString:@"isNight"]) {
        self.backgroundColor = NIGHTCOLOR;
    }else{
        
        self.backgroundColor = DAYCOLOR;
    }
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self name:@"changeColor" object:nil];
    [_LogoLabel release];
    [super dealloc];
}
@end
